#ifndef PREF_MACROS_H_
#define PREF_MACROS_H_

#define SETUP_SPINBUTTON(SB, MIN, MAX) {        \
    (SB).set_increments(1, 0);                  \
    (SB).set_range(MIN, MAX);                   \
    (SB).set_alignment(Gtk::ALIGN_RIGHT);       \
  }

#define TABLE_SPACING(T, C, R) {                \
    (T).set_col_spacings(R);                    \
    (T).set_row_spacings(C);                    \
  }
#define TABLE_LABEL_F(T, C, R, L) {                                     \
    (T).attach(*Gtk::manage(new Gtk::Label(L, Gtk::ALIGN_LEFT)),        \
               C, (C) + 1, R, (R) + 1,                                  \
               Gtk::SHRINK | Gtk::FILL, Gtk::SHRINK | Gtk::FILL);       \
  }
#define TABLE_LABEL(T, R, L) TABLE_LABEL_F(T, 0, R, L)

#endif/*PREF_MACROS_H_*/
